/*
*	File: CoreMaterial.h
*	Date: 12/14/2011
*	Author: Ivan Gao
*	Desc:
*/
#ifndef COREMATERIAL_H_
#define COREMATERIAL_H_
#include "CommonDef.h"
#include <string>
#include <vector>
using namespace std;
#define MAX_MATERIAL_TYPE_LEN  128
class SIMPLEANIMATION_API SCoreMaterial
{
public:
	struct Color
	{
		unsigned char red, green, blue, alpha;
	};
	struct Map
	{
		string strFileName;
		string strType;
	};
	SCoreMaterial ();
	SCoreMaterial (const SCoreMaterial & rMtl);
	~SCoreMaterial ();
	const Color & GetAmbientColor () const;
	const Color & GetDiffuseColor () const;
	const Color & GetSpecularColor () const;
	float GetShiness () const;
	int GetMapCount () const;
	const string & GetMapFileName (int nMapId) const;
	const string & GetMapType (int nMapId) const;
	const string & GetFileName () const;
	const string & GetName () const;
	vector<Map> & GetVectorMap ();
	const vector<Map> & GetVectorMap () const;
	bool Reserve (int nMapCount);
	void SetAmbientColor (const Color & ambientColor);
	void SetDiffuseColor (const Color & diffuseColor);
	void SetSpecularColor (const Color & specularColor);
	void SetShininess (float shininess);
	void SetFileName (const char * pFileName);
	void SetName (const char * pName);
	bool SetMap (int nMapId, const Map & map);
	void AddMap (const Map & map);
private:
	Color		m_ambientColor;
	Color		m_diffuseColor;
	Color		m_specularColor;
	float		m_shininess;
	vector<Map> m_vecMap;
	string		m_strName;
	string		m_strFileName;
};
#endif // COREMATERIAL_H_